/*!
\brief MyChatServer:
This is a simple server that implemets Secure Socket Layer.
*/

#ifndef MYCHATSERVER_H
#define MYCHATSERVER_H

// preprocessor directives
#include <iostream>
#include <QtCore>
#include <QTcpServer>
#include <QString>
#include <QVector>



class MyChatServer : public QTcpServer
{
    Q_OBJECT

public:
    /*! MyChatServer
     \brief Constructor
     \param parent
      */
    MyChatServer(QObject *parent = 0);

    /*! \var QVector<QTcpSocket*> socketVector
      \brief Vector that stores all of the socket IDs
      */
    QVector<QTcpSocket*> socketVector;

private:

    /*! \var QTcpServer *tcpServer
      \brief
      */
    QTcpServer *tcpServer;

    /*! \var QString theMessage
      \brief stores the chat message
      */
    QString theMessage;

private slots:
    /*! handleIncomingConnection
      \brief Retrieve the socket of the client that is attempting to connect to the server and
      make client handler object and give it the socket to manage.
      */
    void handleIncomingConnection();

};

#endif // MYCHATSERVER_H
